
#ifndef _IIC_H_
#define _IIC_H_

#include "main.h"

#define  SCL GPIO_PIN_1  
#define  SDA GPIO_PIN_2

#define IIC_PORT_ENABLE __HAL_RCC_GPIOA_CLK_ENABLE()
#define IIC_PORT GPIOA

#define SCL_H HAL_GPIO_WritePin(IIC_PORT,SCL,1)
#define SCL_L HAL_GPIO_WritePin(IIC_PORT,SCL,0)
#define SDA_H HAL_GPIO_WritePin(IIC_PORT,SDA,1)
#define SDA_L HAL_GPIO_WritePin(IIC_PORT,SDA,0)

#define Address 0x78

void IIC_GPIO_Init();

void IIC_Init();

void IIC_WrCmd(uint8_t cmd);


void IIC_WrData(uint8_t data);

void IIC_Start();

void IIC_Stop();

void IIC_Ack();


void IIC_WrByte(uint8_t data);

void IIC_WrCmd(uint8_t cmd);

void IIC_WrData(uint8_t data);





#endif